#pragma once

#include "item_id.h"

namespace icache {

class still_image_id : public item_id
{
public: //item_id interface
	virtual bool equal(const item_id & i) const;
	virtual string name() const;
	virtual void serialize(std::ostream & o) const;
	virtual bool loadable() const { return true; }
	virtual void load(byte_image & im) const;
	virtual bool requestable() const { return false; }
	virtual void request() const;
	virtual bool cache_on_disc() const { return false; }
public:
	string path; ///< path to image outside the cache
public:
	still_image_id(string const & p) : path(p) { }
	static item_id_sptr create(string const & p)
		{ return item_id_sptr(new still_image_id(p)); }
};

class still_image_id_deserializer : public item_id_deserializer
{
public:
	virtual item_id_sptr parse(std::istream & i) const;
};
extern still_image_id_deserializer the_still_image_id_deserializer;

} //namespace icache
